Skip to content

Add Anthropic User Profile attribution options#16563

Draft
kkdawkins wants to merge 1 commit into
mainfrom
kda-148-ai-sdk-anthropic-user-profiles
Draft

Add Anthropic User Profile attribution options#16563
kkdawkins wants to merge 1 commit into
mainfrom
kda-148-ai-sdk-anthropic-user-profiles

Conversation

@kkdawkins

Copy link
Copy Markdown
Contributor

Summary

  • Add providerOptions.anthropic.userProfileId for Anthropic-compatible providers.
  • Send anthropic-user-profile-id on direct Anthropic, Claude Platform on AWS, and Vertex Anthropic requests.
  • Send Bedrock attribution via user_profile_id for native Bedrock Anthropic and Bedrock Converse Anthropic models.
  • Document usage and add a patch changeset.

Tests

  • pnpm --filter @ai-sdk/anthropic test:node src/anthropic-language-model.test.ts
  • pnpm --filter @ai-sdk/amazon-bedrock test:node src/anthropic/amazon-bedrock-anthropic-provider.test.ts src/amazon-bedrock-chat-language-model-options.test.ts src/amazon-bedrock-chat-language-model.test.ts
  • pnpm --filter @ai-sdk/anthropic type-check
  • pnpm --filter @ai-sdk/amazon-bedrock type-check
  • pnpm --filter @ai-sdk/anthropic-aws type-check
  • pnpm --filter @ai-sdk/google-vertex type-check
  • Scoped pnpm exec ultracite check ...
  • git diff --check

Local commands warn because Node is v25.9.0; repo engines allow Node 22/24/26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant